Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

les: simplify prenegfilter #11

Conversation

rjl493456442
Copy link

@rjl493456442 rjl493456442 commented May 6, 2020

This PR does a few things:

  • Remove the hacky simulation clock in the prenegfilter
  • Maintain the waiting set by prenegfilter itself.
    In the original implementation, we decrease the canDialCounter only when the tag is removed.
    In another word, the internal counter depends on the external system. It's not a good idea to do it.
  • Spin up enough queries if needQueries < pending. In the original implementation, actually there is only one live query each time

Copy link
Owner

@zsfelfoldi zsfelfoldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do need the cancel callback provided by PreNegQuery which you removed in this PR. Sure, the filter and the test can work fine without it, the reason for this callback is that the actual UDP implementation needs it (you can find it in my les4 PR). UDP uses reply hash ids and the query implementation maps handlers to hashes after sending the request. The cancel callback removes the mapping so the reply is no longer expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants